<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head lang="zh-cn">
<meta charset="UTF-8" />
<meta name="viewport"
	content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-touch-fullscreen" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta name="format-detection" content="telephone=no" />
<meta name="description" content="厚和尚品" />
<meta name="keywords" content="厚和尚品" />
<title>待付款的订单</title>
<link rel="apple-touch-icon-precomposed" href="" />
<link rel="apple-touch-startup-image" href="" />
<link rel="stylesheet" href="mall/css/css.css"
	th:href="@{/mall/css/css.css}" />
	<link rel="stylesheet" href="mall/lib/layer/layer_mobile/need/layer.css"
	th:href="@{/mall/lib/layer/layer_mobile/need/layer.css}" />
    <script type="text/javascript" src="mall/lib/zpeto/zepto-1.2.0.min.js"
	th:src="@{/mall/lib/zpeto/zepto-1.2.0.min.js}"></script>
<script type="text/javascript"
	src="mall/lib/layer/layer_mobile/layer.js"
	th:src="@{/mall/lib/layer/layer_mobile/layer.js}"></script>
<script type="text/javascript" src="mall/js/comm.js"
	th:src="@{/mall/js/comm.js}"></script>
<script type="text/javascript" src="mall/js/pingpp.js"
	th:src="@{/mall/js/pingpp.js}"></script>
</head>
<body>
		
		
	<div class="order-order">
		<header>
			<img th:src="@{/mall/img/ico-home-01.png}" alt="" />
			<div class="name">厚和尚品</div>
		</header>
		<!-- 获取订单详细信息。其中有 图片地址 。商品的编号， 数量 -->
		<div class="item" th:each="itemInfo : ${orderItemInfos}">
			<div class="goods-img">
				<img th:src="@{'/upload-dir/'+${itemInfo.productId}+'/min/' + ${itemInfo.smallImgPath}}" alt="" />
			</div>
			<div class="content">
				<p class="title" th:text="${itemInfo.proName}">老风农天然450g喝出健康</p>
				<div class="item-pay">
					<div class="price">
						<span class="ftx-01" th:text="${itemInfo.transBonus}">200</span>积分+￥<span
							class="ftx-01" th:text="${itemInfo.transAmt}">59</span>
					</div>
					<div class="quantity" th:text="|× ${itemInfo.count}|">1</div>
				</div>
			</div>
		</div>
		<div style="margin: 0 .3rem;">
			<div class="seperator-wrap">
				<hr class="seperator" />
			</div>
		</div>
		<form id="cartform" method="post" th:action="@{/member/salasreturninformation}">
			<!--  订单的id 和订单总的金额  订单的总积分-->
			<input type="hidden" th:value="${orderInfo.orderId}"  name="orderId"/>
			<input type="hidden" th:value="${orderInfo.transAmt}" name="transAmt"/>
			<input type="hidden" th:value="${orderInfo.transBonus}" name="salesReturnBonus"/>
		<div style="margin: 0 .3rem;">
			<div class="seperator-wrap">
				<hr class="seperator" />
			</div>
		</div>
		<div class="single-row total">
			<label class="title">合计</label>
			<div class="cnt cell">
				<span th:text="|￥ ${orderInfo.transAmt}|">&yen;59</span>
				<span th:text="|${orderInfo.transBonus} 积分|">200</span>
			</div>
		</div>
		</form>
	</div>

	<div class="bottom-fxied" style="left: 0px; bottom: 60px; width: 100%; display: block;">
   		<div class="cell"  >
		<button class="btn btn-red" th:onclick="'javascript:recruitment(\''+${orderInfo.orderId}+'\')'">物流监控</button>
		</div>
	</div>

<div style="margin:0 .3rem;"><div class="seperator-wrap"><hr class="seperator"/></div></div>
 <div class="bottom-fxied" style="left: 0px; bottom: 0px; width: 100%;display: block;">
   	<div  class="cell"  >
		<button class="btn btn-red" ontouchend="commit();">发起退货</button>
	</div>
</div>
<script type="text/javascript">
	function recruitment(orderid){
				$.ajax({
     					type:"post",
     					url:"/member/trackingNumberCheck?orderId="+orderid,
     					dataType:"json",
     					success:function(data){
     						if(data.success=="失败"){
     							alert("系统异常")
     						}
     						if(data.Success==true){
     							//获取快递公司的编码
     							var numberIdentification=(data.Shippers)[0].ShipperCode;
     							//获取物流单号
     							var trackingNumber=data.LogisticCode;
     							location.href="/member/trackingInformationCheck?companyCode="+numberIdentification+"&amp;number="+trackingNumber;
     						}else{
     								layer.open({
									content :'系统繁忙',
								//skin : 'msg',
									scrollbar: false,
									time : 3,
								//2秒后自动关闭
								});
								return ;
     						}
     					}
     				})
	}


function commit(){
	$("#cartform").submit();
		
}

</script>
</body>
</html>